package com.wei.tang.bean;

import java.util.Date;

import com.wei.tang.AppContext;

public class CourseBean extends Bean {

	/**
	 * 课程ID
	 */
	private String course_id;
	/**
	 * 课程名字
	 */
	private String course_name;
	/**
	 * 课程地址
	 */
	private String course_url;
	/**
	 * 课程上传时间
	 */
	private String course_loadtime;
	/**
	 * 课程作者ID
	 */
	private String course_userid;
	/**
	 * 课程作者NAME
	 */
	private String course_username;
	/**
	 * 课程分类ID
	 */
	private String course_classifyid;
	/**
	 * 课程大小
	 */
	private String course_size;
	/**
	 * 课程时长
	 */
	private String course_time;
	/**
	 * 播放次数
	 */
	private String course_playtimes;
	/**
	 * 评论次数
	 */
	private String course_commenttimes;
	/**
	 * 点赞次数
	 */
	private String course_praisetimes;

	public CourseBean() {
	}

	/**
	 * 初始化
	 * 
	 * @param _course_id
	 * @param _course_name
	 * @param _course_url
	 * @param _course_time
	 * @param _course_playtimes
	 * @param _course_size
	 */
	public CourseBean(String _course_id, String _course_name, String _course_time, String _course_playtimes,
			String _course_size, String _course_url, String _course_classifyid) {
		this.course_id = _course_id;
		this.course_name = _course_name;
		this.course_url = _course_url;
		this.course_time = _course_time;
		this.course_playtimes = _course_playtimes;
		this.course_size = _course_size;
		this.course_classifyid = _course_classifyid;
	}

	public CourseBean(String _course_name, String _course_classifyid, String _course_url) {
		this.course_name = _course_name;
		this.course_url = _course_url;
		this.course_classifyid = _course_classifyid;
		this.course_playtimes = "0";
		this.course_size = "classtitle0";
		this.course_time = "0";
		this.course_commenttimes = "0";
		this.course_praisetimes = "0";

		Date newTime = new Date();
		this.course_loadtime = newTime.getYear() + "-" + newTime.getMonth() + "-" + newTime.getDay() + " "
				+ newTime.getHours() + ":" + newTime.getMinutes();
		this.course_userid = AppContext.USERBEAN.getUser_id();
		this.course_username = AppContext.USERBEAN.getUser_name();
	}

	public String getCourse_id() {
		return course_id;
	}

	public void setCourse_id(String course_id) {
		this.course_id = course_id;
	}

	public String getCourse_name() {
		return course_name;
	}

	public void setCourse_name(String course_name) {
		this.course_name = course_name;
	}

	public String getCourse_url() {
		return course_url;
	}

	public void setCourse_url(String course_url) {
		this.course_url = course_url;
	}

	public String getCourse_loadtime() {
		return course_loadtime;
	}

	public void setCourse_loadtime(String course_loadtime) {
		this.course_loadtime = course_loadtime;
	}

	public String getCourse_userid() {
		return course_userid;
	}

	public void setCourse_userid(String course_userid) {
		this.course_userid = course_userid;
	}

	public String getCourse_username() {
		return course_username;
	}

	public void setCourse_username(String course_username) {
		this.course_username = course_username;
	}

	public String getCourse_classifyid() {
		return course_classifyid;
	}

	public void setCourse_classifyid(String course_classifyid) {
		this.course_classifyid = course_classifyid;
	}

	public String getCourse_size() {
		return course_size;
	}

	public void setCourse_size(String course_size) {
		this.course_size = course_size;
	}

	public String getCourse_time() {
		return course_time;
	}

	public void setCourse_time(String course_time) {
		this.course_time = course_time;
	}

	public String getCourse_playtimes() {
		return course_playtimes;
	}

	public void setCourse_playtimes(String course_playtimes) {
		this.course_playtimes = course_playtimes;
	}

	public String getCourse_commenttimes() {
		return course_commenttimes;
	}

	public void setCourse_commenttimes(String course_commenttimes) {
		this.course_commenttimes = course_commenttimes;
	}

	public String getCourse_praisetimes() {
		return course_praisetimes;
	}

	public void setCourse_praisetimes(String course_praisetimes) {
		this.course_praisetimes = course_praisetimes;
	}

	@Override
	public String toString() {
		return "CourseBean [course_id=" + course_id + ", course_name=" + course_name + ", course_url=" + course_url
				+ ", course_loadtime=" + course_loadtime + ", course_userid=" + course_userid + ", course_username="
				+ course_username + ", course_classifyid=" + course_classifyid + ", course_size=" + course_size
				+ ", course_time=" + course_time + ", course_playtimes=" + course_playtimes + ", course_commenttimes="
				+ course_commenttimes + ", course_praisetimes=" + course_praisetimes + "]";
	}

}
